<template>
  <div class="headers">
    <span class="el-icon-arrow-left black" @click="goBack"></span>
    <slot></slot>
  </div>
</template>
<script>
  export default {
    name: 'hd',
    props: ['page'],
    mounted () {
      // console.log(this.$roter)
    },
    methods: {
      goBack () {
        console.log('page', this.page)
        this.page ? '' : window.history.go(-1)
      }
    }
  }
</script>
<style scoped>
  .headers {
    height: 1rem;
    width: 100%;
    /* background:hotpink; */
    text-align: center;
    font-weight: 900;
    line-height: 1rem;
    padding: 0 0.31rem;
  }
  p{
    width:100%;
    text-align:center;
  }
  .black{
    position: absolute;
    top: 0;
    left: 0;
    width: 1rem;
    height: 1rem;
    line-height:1rem;
  }
</style>
